package com.windward.vii.service.weixin.bean;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;

import java.io.Serializable;

/**
 * Created by fred on 15/9/10.
 */
@JacksonXmlRootElement(localName = "xml")
public class CallbackResponse implements Serializable{
    private String return_code;
    private String return_msg;

    @Override
    public String toString() {
        return "CallbackResponse{" +
                "return_code='" + return_code + '\'' +
                ", return_msg='" + return_msg + '\'' +
                '}';
    }

    public CallbackResponse(String return_code, String return_msg) {
        this.return_code = return_code;
        this.return_msg = return_msg;
    }

    public static CallbackResponse callbackResponseSuccess() {
        return new CallbackResponse("SUCCESS","OK");
    }

    public static CallbackResponse callbackResponseFail(String errorMsg) {
        return new CallbackResponse("FAIL",errorMsg);
    }

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }
}
